<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<!-- saved from url=(0014)about:internet -->
<!-- License Revision: 0 Last Revised: 6/18/2008 11:00 AM
*******************************************************************************
Copyright (c) Microsoft Corporation.  All rights reserved.


This file is licensed under the Microsoft Public License (Ms-PL). A copy of the Ms-PL should accompany this file. 
If it does not, you can obtain a copy from: 

http://www.microsoft.com/resources/sharedsource/licensingbasics/publiclicense.mspx
*******************************************************************************
License -->
<head>
    <title>Test Page For SilverlightMap</title>
    <meta http-equiv="content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2"></script>
    <script type="text/javascript" src="popup.js"></script>
    <script type="text/javascript" src="views.js"></script>
</head>

<body>
    <div id='myMap' style="position:relative; width:800px; height:600px;"></div>
    <script id="Code1" type="text/javascript">
    // silverlight control
    var silverlight = null;
    function pluginLoaded(sender,args)
    {
        silverlight = document.getElementById('SilverlightMainPane');
    }

    // Silverlight control error callback
    function onSilverlightError(sender, args) {
    
        var appSource = "";
        if (sender != null && sender != 0) {
            appSource = sender.getHost().Source;
        } 
        var errorType = args.ErrorType;
        var iErrorCode = args.ErrorCode;
        
        var errMsg = "Unhandled Error in Silverlight 2 Application " +  appSource + "\n" ;

        errMsg += "Code: "+ iErrorCode + "    \n";
        errMsg += "Category: " + errorType + "       \n";
        errMsg += "Message: " + args.ErrorMessage + "     \n";

        if (errorType == "ParserError")
        {
            errMsg += "File: " + args.xamlFile + "     \n";
            errMsg += "Line: " + args.lineNumber + "     \n";
            errMsg += "Position: " + args.charPosition + "     \n";
        }
        else if (errorType == "RuntimeError")
        {           
            if (args.lineNumber != 0)
            {
                errMsg += "Line: " + args.lineNumber + "     \n";
                errMsg += "Position: " +  args.charPosition + "     \n";
            }
            errMsg += "MethodName: " + args.methodName + "     \n";
        }

        throw new Error(errMsg);
    }
    </script>
    
    <!-- NOTE: for proper overlap behavior, either both controls must be transparent and windowless, or both must be non-transparent and windowed -->
     <div style="position:absolute; width:200px; height:640px; left:810px; top:10px; z-index:2">
		<object data="data:application/x-silverlight," type="application/x-silverlight-2" style="height:600px;width:200px;border-width:0;" id="SilverlightMainPane">
			<param name="source" value="ClientBin/SilverlightMap.xap"/>
			<param name="background" value="#00FFFFFF" />
			<param name="windowless" value="true" />
			<param name="onLoad" value="pluginLoaded" />
			<param name="onerror" value="onSilverlightError" />
			
			<a href="http://go.microsoft.com/fwlink/?LinkID=108182" style="text-decoration: none;">
     			<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>
			</a>
		</object>
		<iframe style='visibility:hidden;height:0;width:0;border:0px'></iframe>
    </div>
   <div id="popuphost" style="position:absolute; left:100px; top:100px; width:800px; height:800px; z-index:50000">
		<object data="data:application/x-silverlight," type="application/x-silverlight-2" style="height:300px;width:300px;border-width:0;" id="SilverlightPopup">
			<param name="source" value="ClientBin/SilverlightPopup.xap"/>
			<param name="background" value="#00FFFFFF" />
			<param name="windowless" value="true" />
			<param name="onLoad" value="pluginLoadedPopup" />
			<param name="onerror" value="onSilverlightError" />
			
			<a href="http://go.microsoft.com/fwlink/?LinkID=108182" style="text-decoration: none;">
     			<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>
			</a>
		</object>
		<iframe style='visibility:hidden;height:0;width:0;border:0px'></iframe>
    </div>
</body>
</html>
